Public Class CustomDeviceEmulatorForm

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Check out the CustomEmulator class in the same directory as this
        ' form to see how you can build your own emulators.  Emulated data
        ' is parsed in exactly the same way as live data, by assigning an
        ' NmeaInterpreter to a Stream which provides raw data.

        CustomEmulatorInterpreter.BaseStream = New CustomEmulator()

        ' The interpreter is now started, and will process data generated
        ' by your custom emulator.

        CustomEmulatorInterpreter.Start()

    End Sub

    Private Sub CustomEmulatorInterpreter_SentenceReceived(ByVal sender As Object, ByVal e As GeoFramework.Gps.Nmea.NmeaSentenceEventArgs) Handles CustomEmulatorInterpreter.SentenceReceived
        ' Add the newly-received sentence to the list box
        CustomSentencesListBox.Items.Add(e.Sentence.ToString())
        ' Make sure the last item is always visible
        CustomSentencesListBox.SelectedIndex = CustomSentencesListBox.Items.Count - 1
    End Sub

End Class